package com.doit.day01;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPubSub;

public class PublishDemo {
    public static void main(String[] args) {
        Jedis jedis = new Jedis("linux01", 6379);
        jedis.subscribe(new JedisPubSub() {
            @Override
            public void onMessage(String channel, String message) {
                System.out.println("数据是从   "+channel +"==该频道来的，数据是："+message);

            }
        },"A");
    }
}
